package hk.service.impl;

import hk.beans.Account;
import hk.mapper.AccountMapper;
import hk.service.AccountService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @version 1.0
 * @Author YangJiaQuan_hrbnu
 * @Date 2024/4/24 19:32
 */
@Service
public class AccountServiceImpl implements AccountService {

    @Resource
    private AccountMapper accountMapper;
    @Override
    public void addAccount(Account account) {
        accountMapper.addAccountMoney(account);
    }
    @Override
    public Account getAccountById(String account) {
        return accountMapper.getAccountById(account);
    }

    @Override
    public List<Account> getAllMsg() {
        return accountMapper.getAllMsg();
    }

    @Override
    public int getAllMoney() {
        return accountMapper.getAllMoney();
    }

    @Override
    public void delete(int id) {
        accountMapper.delete(id);
    }
}
